Skip to content

Restore upstream server core execution in OpenFrame mode - #81

Merged
mikhailm-coder merged 2 commits into
masterfrom
hotfix/openframe-core-server-push
Aug 20, 2026
Merged

Restore upstream server core execution in OpenFrame mode#81
mikhailm-coder merged 2 commits into
masterfrom
hotfix/openframe-core-server-push

Conversation

@mikhailm-coder

@mikhailm-coder mikhailm-coder commented Aug 10, 2026

Copy link
Copy Markdown

Why

OpenFrame agents currently execute a frozen disk CoreModule.js instead of the core the MeshCentral server pushes — the push is received, stored in the agent DB, and acked, but two openFrameMode branches substitute the disk file at execute time. That made core updates undeliverable (the disk file froze in an oss-lib JAR) and left a real inconsistency: the 60s offline-fallback executes the DB core, i.e. today the vanilla upstream core. This PR restores the stock upstream mechanism: the server compiles and pushes the core; the OpenFrame gateway URL patch now lives in the server's core source (flamingo-stack/meshcentral#73).

What

meshcore/agentcore.c:

  • MeshCommand_CoreModule handler: removed the openFrameMode branch that ran the disk file; the freshly received server core executes, as upstream.
  • CoreOk handler: removed the openFrameMode disk-load branch; the DB core executes, as upstream. (This also removes a latent bug: the disk file was compiled with a +4 offset meant for DB blobs.)
  • Removed the now-unused buildOpenframeCoreModulePath() helper and fork debug printfs ([COREMODULE-2], pointer-printing CoreOk log). Restored regions verified byte-identical to Ylianst/MeshAgent upstream.
  • Kept all other OpenFrame behavior: mesh.authToken(), control-channel auth header, binary self-update suppression, cert-rotation and NodeID relaxations.

Rollout notes (order is load-bearing)

  • The server core (meshcentral#73) must be deployed before this binary rolls out in an environment. A new binary against an unpatched server core would run stock upstream tunnel URLs and lose remote access. Old binaries against a patched server are safe (push stored, ignored).
  • With an empty DB and no reachable server, no core runs until the first push — same as upstream, and same as before this change (the disk file was only ever executed from the push/CoreOk handlers).
  • Supersedes the GitHub-release-asset approach (Ship CoreModule.js in both release archives #79, to be closed after dev verification).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • CoreModule startup and restart behavior is now consistent across environments.
    • CoreModule loading now reliably uses the database, including after server verification.
    • Updated status messages provide clearer information about restarts, verification, launches, and already-running states.

Removes the two openFrameMode branches that executed a disk CoreModule.js
instead of the server-pushed core (push handler and CoreOk handler), and
the now-unused buildOpenframeCoreModulePath helper. The core is delivered
by the meshcentral server again, per upstream design; the OpenFrame
gateway URL patch now lives in the server's agents/meshcore.js.

Kept: authToken, control-channel auth header, binary self-update
suppression, cert-rotation and NodeID relaxations.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 753ff2f9-4b7d-4faa-a163-c7603309b3cd

📥 Commits

Reviewing files that changed from the base of the PR and between 9918480 and b42f5a2.

📒 Files selected for processing (1)
  • meshcore/agentcore.c

📝 Walkthrough

Walkthrough

CoreModule restart and startup no longer load OpenFrame-specific files. They use server-provided or database module data. Related verification, launch, restart, and already-running logs now use generic meshcore wording.

Changes

CoreModule loading

Layer / File(s) Summary
Database-backed CoreModule lifecycle
meshcore/agentcore.c
CoreModule restart uses server-provided module data. Verified startup reads the module from the database. Status messages no longer use OpenFrame- or timeout-specific wording.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: denys-gif

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes restoring server-pushed core execution for OpenFrame agents.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotfix/openframe-core-server-push

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mikhailm-coder
mikhailm-coder enabled auto-merge (squash) August 19, 2026 12:25
@mikhailm-coder
mikhailm-coder merged commit d72a133 into master Aug 20, 2026
3 checks passed
@mikhailm-coder
mikhailm-coder deleted the hotfix/openframe-core-server-push branch August 20, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants